import { request, baseUrl } from '@/utils/request'

export function getSampleInfo(sampleCode) {
  return request({
    url: `${baseUrl.api_base_url}/tbceSample/tbCeSample/v1/query
    `,
    method: 'post',
    data: {
      pageBean: { page: 1, pageSize: 10 },
      querys: [
        {
          group: 'advance',
          operation: 'EQUAL',
          property: 'sampleCode',
          relation: 'AND',
          value: sampleCode,
        },
      ],
      sorter: [],
    },
  })
}

//获取代号列表
export function getSampleNoList() {
  return request({
    url: `${baseUrl.api_base_url}/tbqmplantsampledata/tbQmPlantSampleData/v1/findPage
    `,
    method: 'post',
    data: {
      pageBean: { page: 1, pageSize: 500 },
      querys: [],
    },
  })
}

//确认接样
export function sampleAccept(data) {
  return request({
    url: `${baseUrl.api_base_url}/tbceSampleAccept/tbCeSampleAccept/v1/sampleAccept
    `,
    method: 'post',
    data,
  })
}
